-- Configuration - Config.lua -- This is an explanation of all the config options. Config.Lan: There is a built in locale system, you will need to grab or create your language at: https://github.com/jimathy/mechanic-locales You will need to then set the langauge with Config.Lan. By default it's set to english ("en") Config.Debug: This enables a debug mode, this will enable the debug boxes around locations to show you where they are set and where they are moving to. Config.img: This is for Check_tunes and crafting. The default would be "qb-inventory/html/images/" but I personally use LJ's inventory system which makes it "lj-inventory/html/images/" Config.distkph: This is ONLY for the odometer which is explained below in check_tunes.lua, this shows the cars distance travelled. True = distance in Kilometers, false = distance in Miles Config.UseMechJob: This enables and disables integration with qb-mechanicjob, this enables access to fixing extra part damage enabled in qb-vehiclefailure The script works just aswell with this disabled Config.isVehicleOwned: This checks the player_vehicles for if the vehicle is player owned or not. If you only want customisations to be made to player owned vehicles, enable this. Config.RequiresJob: Makes it so performance items and mecahnics tools are locked behind a job role. Config.LocationBlips: This enables your locations blips even if you disable location requirements Config.LocationRequired: This makes it so the items and parts in this script are required to be used at your set locations If RequiresJob is disabled, anyone can use items, but only at these locations Config.JobRequiredForLocation: This makes it so each location has to be used by their set job roles, eg. Benny's workers will have to work at Bennys only. Config.CostmeticJob: This enables or disables a job requirement on cosmetic items. Config.FreeRepair: This makes all repairs by mecahnics not require any materials to repair. Config.StashRepair: This enables mechanics material stashes. When a repair is done, the material cost will be taken from the set stash instead of a players inventory. Config.StashCraft: This enables grabbing materials from the mechanics material stash for crafting. If disabled materials will be taken from the players inventory Config.Stores: This enables or disables the Stores feature in stores.lua Config.Crafting: This enables or disables the Crafting feature in crafting.lua Config.Repair*: These are the repair costs and materials that are needed Each one has to have a set item The cost for each is a MAX amount, eg. 100% damage would be this number, 50% would be half this number. Ducttape configs: This are for the alternative item to repairkits They are customisable and let even set the max amount of how much the parts get repaired Config.Jobroles: These are the job roles that you want to be able to use the items in this script (if Config.RequiresJob is enabled) The defualt setting is just "mechanic". ----------------------------------------------------------------------------------------------------------------------- -- Performance Items -- These include: armour, brakes, engines, suspension, tires(dift and bulletproof), transmission, turbo and xenons. These work very similarly Stand next to the vehicle and use the items, this will install them If you have a different level, higher or lower, adding this item will put the previous level item into your inventory. The toolbox is used here to remove the part that is already in and set it back to stock. ----------------------------------------------------------------------------------------------------------------------- -- Cosmetic Items -- These include: exhausts, exterior, hood, horns, interior, livery, paint, plates, rims, seats, skirts, spoilers, tiresmoke and windows. These also work very similarly Stand next to or get in the vehicle and use these items, this will bring up a menu that allows you to customise the parts The items ARE NOT consumed on use, as this wouldn't work when using qb-menu. There are so many options and menu changes its impossible to add item removal. ----------------------------------------------------------------------------------------------------------------------- -- Check_tunes.lua -- This is all about the item "toolbox" this item is only usable by mechanics(if job requirements are enabled) This is expanded by added an INT column to player_vehicles called "traveldistance" This will add an odometer to the info and show it as Milage or Kilometers. If you don't add this column this will not show. This will show info about installed performance items, which part and level is installed, wether they are even able to be installed. If there is a part installed, you can click the item to remove it and set it back to Stock. At the bottom is an option to view a list of available cosmetics for the current vehicle, you cannot do anything here, just view what is possible to change on it. ----------------------------------------------------------------------------------------------------------------------- -- Repair.lua -- This is actiavted by the item "mechanic_tools" You will check the engine and body for damage and then get a list of damages. There are Config settings to fine tune how this works FreeRepair will allow you to repair the car with no requirements StashRepair will place a stash location for the mechanics to place their materials so they can be used when repairing. The locations for the mechanics stashes are set at the top of the file, the default is set to Gabz Tuners. ----------------------------------------------------------------------------------------------------------------------- -- Locations.lua -- These are set in locations.lua using PolyZones The defaults are set to Hayes Auto and Gabz Tuners at the docks. These are easy to edit, change or remove, make a new polyzone using the commands /pzcreate poly, /pzadd and /pzfinish These are made use of in Config.LocationRequired, enabling this makes it to performance items can only be added to cars in this zone. If you have Config.RequiresJob disabled, anyone can use the items in this location, enabling this makes it so mechanic workers are the only ones who can use them. Enabling Config.JobRequiredForLocation makes it so you need to have have the specified job for the specified building, eg. Benny's workers can only work in the Benny's Building. If you have these enabled, the workers will be automatically clocked in when entering the building and clocked out when exiting the building. If you want to add a new polyzone location, to start you need to be near the building you want to add. Type "/pzcreate poly" to start creating a PolyZone. Pick a name, this doesn't matter as you set this later in locations.lua You will then get a red line right where you are standing. Use your ARROW keys to move this around to the first corner/point you want to place. When its in the correct place, type "/pzadd" and this will lock the current point and allow you to create another Repeat this until your last corner/point where you will type "/pzfinish". This will save all the vectors of the points you have chosen and place them in a file called: "polyzone_created_zones.txt" In this file is the vectors that you need to copy over to my scripts. ----------------------------------------------------------------------------------------------------------------------- -- NOS.lua -- The nos features are expanded if you add two new columns to your player_vehicles database One column needs to be a boolean column called "hasnitro" The other needs to be an INT colum called "noslevel" Adding these will save the NOS between server restarts for player owned vehicles, otherwise the amount of nos left over will be lost at a script or server restart To add NOS to a vehicle you will first need Turbo to be installed on the vehicle. Then you will need a full NOS cannister(nos) and to use it outside of the vehicle. This will start a skill check to install it. To use the NOS boost inside the vehicle, use the Left Shift button. This will activate the nitrous purge if you are travelling under a certain speed. When the NOS runs out, the driver will receive an empty nos car, which can be refilled/crafted to make it full again. If you put in a new can before you run out of NOS in the vehicle you will also recieve an empty can. ----------------------------------------------------------------------------------------------------------------------- -- Crafting.lua -- This hold the crafting abilities for mechanics You can enable or disable this entirely in the Config.lua with Config.Crafting This is a simple crafting system with the recipes kept in the craftin.lua itself at the bottom The locations where you can craft are set right at the top. ----------------------------------------------------------------------------------------------------------------------- -- Stores.lua -- This is a basic "shop" for mechanics, this allows them to quickly grab the item they need to customise a vehicle The prices, amounts and such can all be edited within the stores.lua tables at the bottom. As with crafting.lua you can set the locations at the top of the file. ----------------------------------------------------------------------------------------------------------------------- -- Payments.lua -- This script is mainly controlled by my free payment script: jim-payments (https://github.com/jimathy/jim-payments) The default location is set to the Gabz Tuners, a worker with the correct job role will need to target this location and choose the correct person to charge This location spawns with a cash register prop to help find it. On accepting of the payment, everyone with the correct job and who is on duty, will get a receipt. This can be cashed in at the bank to for an amount set in the jim-payments config. There is also a built in /charge command that works like the /bill command. It sends an invoice to the customer who can then pay it on their phone. ----------------------------------------------------------------------------------------------------------------------- -- Police.lua -- This is intended to be for police/ambulance players It adds a bench to the set locations where they can repair and change a few cosmetics/extras. This is opened by using third eye/qb-target You can add other roles to use this but it's not recommended. ----------------------------------------------------------------------------------------------------------------------- -- QuickRepair.lua -- This is all about the ducttape item ALOT of the settings for this are highly customisable and in the config.lua ----------------------------------------------------------------------------------------------------------------------- -- Preview.lua -- The preview system is shown by typing /preview This shows a menu with all possible cosmetic changes for the current vehicle This will attempt to disable the engine so you can't change then drive away with the changes. You are able to close the menu when picking cosmetics as it will only "finish" when you leave the drivers seat Depending on the settings you have chosen in the Config.Lua you will either receive an item or and email with the list of changes I recommend emails if you are only allowing mechanics to do the previews, The item can either be mechanic only or customers only and then passed to the mechanics. I'm not sure how other phone systems work but the email side of this is made for qb-phone but may be able to be adapted to other phones